<template>
  <el-button-group class="ct-tool-list">
    <el-tooltip effect="dark" content="删除" placement="top">
      <el-button size="mini" type="primary" icon="el-icon-delete" @click="handlerDel"></el-button>
    </el-tooltip>
    <el-tooltip effect="dark" content="锁定" placement="top">
      <el-button size="mini" type="primary" icon="el-icon-lock"></el-button>
    </el-tooltip>
  </el-button-group>
</template>
<script type="text/javascript">
// import empty from './empty.vue'
import { mapState, mapMutations, bootstrap } from 'vuecx'
export default {
  props:{
    value:[Object,Array],
  },
  components: {
    //empty
  },
  data() {
    return {

    }
  },
  /**
   * 计算属性
   * @type {Object}
   */
  computed: {
    ...mapState(['pool']),
  },
  /**
   * 数据监听
   * @type {Object}
   */
  watch: {

  },
  /**
   * 页面加载执行
   * @return {[type]} [description]
   */
  mounted() {

  },
  /**
   * 页面方法
   * @type {Object}
   */
  methods: {
    // 移除布局中组件
    handlerDel(){
      // if(!this.pool['components-tool']){
      //   this.$message.warning('警告哦，这是一条警告消息');
      //   return false;
      // }
      // this.$confirm('删除之后将不可恢复, 是否继续?', '系统提示', {
      //   confirmButtonText: '继续',
      //   cancelButtonText: '取消',
      //   type: 'warning'
      // }).then(() => {

      //   this.pool['components-tool'].components = {
      //     "handle": "", 
      //     "attribute": {} 
      //   };

      //   this.$message.success('删除成功!');
      // }).catch(() => {
      //   this.$message.info('已取消删除');
      // });
    }
  }
}

</script>
<style type="text/css" lang="scss">
</style>
